package com.example.security.controller;

import javax.annotation.security.RolesAllowed;

import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value="/user")
public class UserController {
	
	@Secured("ROLE_ADMIN")
	@RequestMapping(value="/{userId}",method =RequestMethod.GET)
	public String getUserById() {
		return "hhhhhhh";
		
	}

}
